package demo10super详解;

//在java中，所有的类，都默认直接或间接继承object
//Person 人 ：父类
public class Person /*extends Object*/ {

    public Person() {
        System.out.println("Person无参构造实行了");
    }

    public Person(String name) {
        this.name = name;
        System.out.println(name);
    }

    protected String name = "gongjingwen";

    //私有的东西无法被继承
    public void print(){
        System.out.println("Person");
    }

}
